package demo;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class demo3 {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress address = InetAddress.getLocalHost();
        String ip = address.getHostAddress();
        System.out.println(ip);
    }
}
